package com.weifeng.learneasyexcel.readexceldemo;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
import com.weifeng.learneasyexcel.HelloWord;
import com.weifeng.learneasyexcel.util.configlog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DemoDataListener extends AnalysisEventListener<Exceluntity> {
    public DemoDataListener(){
        new configlog();

    }
    Logger logger = LoggerFactory.getLogger(HelloWord.class);

    @Override
    public void invoke(Exceluntity exceluntity, AnalysisContext analysisContext) {
        logger.info("解析开始："+ JSON.toJSONString(exceluntity));
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        logger.info("所有数据解析完成！");
    }
}
